home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / HyperCuber Source / HyperCuber 2.0 Source.sit / HyperCuber 2.0 Source / CHyperCuberPrefs.h < prev    next >
Text File  |  1994-04-12  |  2KB  |  79 lines

  1. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. //| CHyperCuberPrefs.h
  3. //|
  4. //| This is the interface to the HyperCuber preferences.
  5. //|_________________________________________________________
  6.  
  7. #pragma once
  8. #include "CPrefs.h"
  9. #include "Keys.h"
  10. #include "Mouse.h"
  11.  
  12. #define MAX_DIMENSION        20
  13. #define MAX_MOUSE_CONTROLS    20
  14. #define MAX_KEY_CONTROLS    100
  15.  
  16. typedef struct
  17.     {
  18.     short    modifiers;                //  Modifier keys for this mouse control
  19.     short    dimension_h;            //  Dimension of the angle to change when mouse moves horizontally
  20.     short    angle_h;                //  Number of the angle to change when mouse moves horizontally
  21.     Boolean    reverse_h;                //  True if angle should be DECREASED for positive mouse movement
  22.     short    dimension_v;            //  Dimension of the angle to change when mouse moves vertically
  23.     short    angle_v;                //  Number of the angle to change when mouse moves vertically
  24.     Boolean    reverse_v;                //  True if angle should be DECREASED for positive mouse movement
  25.     } MouseCStruct;
  26.     
  27. typedef struct
  28.     {
  29.     short    modifiers;                //  Modifier keys for this key control
  30.     char    key_code;                //  Key code the the key
  31.     short    dimension;                //  Dimension of the angle this key control changes
  32.     short    angle;                    //  Number of the angle this key control changes
  33.     short    increment;                //  Amount to change the angle
  34.     } KeyCStruct;
  35.     
  36.     
  37. typedef struct                                //  The preferences structure
  38.     {
  39.     short        prefs_version;
  40.     RGBColor    background_color;
  41.     RGBColor    left_eye_color;
  42.     RGBColor    right_eye_color;
  43.     Boolean        stereo;
  44.     Boolean        two_image;
  45.     Boolean        antialias;
  46.     Rect        graphics_window_position;
  47.     
  48.     Rect        controls_window_position[MAX_DIMENSION+1];
  49.     Boolean        controls_window_visible[MAX_DIMENSION+1];
  50.     
  51.     short                    num_mouse_controls;
  52.     mouse_control_struct    mouse_controls[MAX_MOUSE_CONTROLS];
  53.     
  54.     short                    num_key_controls;
  55.     key_control_struct        key_controls[MAX_KEY_CONTROLS];
  56.         
  57.     } PrefsStruct;
  58.  
  59. #define CURRENT_PREFS_VERSION    12
  60.  
  61. CLASS CWindow;
  62.  
  63. class CHyperCuberPrefs : public CPrefs
  64.     {
  65.     
  66.     short    *GetPrefsPointer(void);
  67.     void    Update(void);
  68.  
  69.   public:
  70.  
  71.     PrefsStruct    prefs;
  72.  
  73.     void    IHyperCuberPrefs(void);
  74.     void    SetDefaults(void);
  75.     void    SetDefaultKeyCommands(void);
  76.     void    SetDefaultMouseCommands(void);
  77.  
  78.     };
  79.